.dependency-graph-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 6px;
    overflow: hidden;

    .dependency-graph-svg {
        width: 100%;
        height: 100%;
        background: #fafafa;
        user-select: none;
        border-radius: 6px;
        border: 1px solid #e8e8e8;
    }

    .dependency-graph-tooltip {
        position: absolute;
        background: rgba(0, 0, 0, 0.85);
        color: white;
        padding: 8px 12px;
        border-radius: 4px;
        font-size: 12px;
        max-width: 200px;
        pointer-events: none;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        white-space: nowrap;

        .tooltip-title {
            font-weight: bold;
            margin-bottom: 4px;
            color: #fff;
        }

        .tooltip-content {
            line-height: 1.4;
            font-size: 11px;

            .tooltip-description {
                margin-top: 4px;
                font-size: 10px;
                opacity: 0.9;
                color: #ccc;
                white-space: normal;
                max-width: 180px;
            }
        }
    }

    .graph-legend {
        position: absolute;
        bottom: 12px;
        left: 12px;
        background: rgba(255, 255, 255, 0.95);
        padding: 8px 12px;
        border-radius: 4px;
        font-size: 12px;
        border: 1px solid #e8e8e8;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(4px);
        display: flex;
        gap: 16px;
        flex-wrap: wrap;

        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
            color: #666;

            .legend-color {
                width: 12px;
                height: 12px;
                border-radius: 50%;
                border: 1px solid rgba(255, 255, 255, 0.8);
                
                &.current { background-color: #52c41a; }
                &.model { background-color: #1890ff; }
                &.dataset { background-color: #722ed1; }
                &.other { background-color: #fa8c16; }
            }

            span {
                font-size: 11px;
                white-space: nowrap;
            }
        }
    }

    .graph-stats {
        position: absolute;
        top: 12px;
        right: 12px;
        background: rgba(255, 255, 255, 0.95);
        padding: 6px 12px;
        border-radius: 4px;
        font-size: 12px;
        border: 1px solid #e8e8e8;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        display: flex;
        gap: 12px;

        span {
            color: #666;
            font-size: 11px;
            white-space: nowrap;
        }
    }
}

.dependency-graph-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    
    div {
        margin-top: 16px;
        color: #666;
        font-size: 14px;
    }
}

.dependency-graph-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    
    .empty-icon {
        font-size: 48px;
        margin-bottom: 16px;
        opacity: 0.5;
    }

    .empty-title {
        font-size: 16px;
        margin-bottom: 8px;
        font-weight: 500;
        color: #666;
    }

    .empty-description {
        font-size: 14px;
        color: #999;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .dependency-graph-wrapper {
        .graph-legend {
            position: relative;
            bottom: auto;
            left: auto;
            margin: 12px;
            justify-content: center;
        }

        .graph-stats {
            position: relative;
            top: auto;
            right: auto;
            margin: 12px;
            justify-content: center;
        }

        .dependency-graph-tooltip {
            max-width: 150px;
            font-size: 11px;
        }
    }
}

/* 优化的动画效果 */
.dependency-graph-wrapper {
    circle {
        &:hover {
            filter: brightness(1.1) drop-shadow(0 2px 4px rgba(0,0,0,0.2));
        }
    }

    line {
        transition: stroke-width 0.2s ease;
        
        &:hover {
            stroke-width: 3;
        }
    }

    text {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }
} 